<template>
  <div></div>
</template>

<script>
export default {
  data() {
    return {
      comments1: [],
      comments2: [],
    };
  },
  async created() {
    this.comments1 = await getComments();
    this.comments2 = await getComments();
  },
  methods: {
    async handleAdd1() {
      await addComment();
      this.comments1 = await getComments();
    },
    async hadleAdd2() {
      const cmt = await addComment();
      this.comments2.unshift(cmt);
    },
  },
};
</script>

<style scoped></style>
